import base from './base'
import requests from '@/utils/request'

//将接口地址单独封装在了base.js里（模块化）
//首页
export const totalInfo = () => requests.get(base.totalInfo)
export const orderInfo = () => requests.get(base.orderInfo)
export const format = () => requests.get(base.format)
//产品管理
export const projectList = (params) => requests.get(base.projectList, { params })
export const search = (params) => requests.get(base.search, { params })
export const deleteItemById = (params) => requests.get(base.deleteItemById, { params })
export const selectItemCategoryByParentId = (params) => requests.get(base.selectItemCategoryByParentId, { params })
//图片上传接口
export const insertTbItem = (params) => requests.get(base.insertTbItem, { params })
export const batchDelete = (params) => requests.get(base.batchDelete, { params })
export const updateTbItem = (params) => requests.get(base.updateTbItem, { params })
//产品分类
export const itemCategory = () => requests.get(base.itemCategory)
export const insertItemCategory = (params) => requests.get(base.insertItemCategory,{params})
export const deleteContentCategoryById = (params) => requests.get(base.deleteContentCategoryById,{params})
export const updateCategory = (params) => requests.get(base.updateCategory,{params})
export const insertCategory = (params) => requests.get(base.insertCategory, { params })
//订单管理
export const orderList = (params) => requests.get(base.orderList,{params})
export const changeStatus = (params) => requests.get(base.changeStatus,{params})
export const collect = (params) => requests.get(base.collect,{params})
export const cancel = (params) => requests.get(base.cancel,{params})
export const detail = (params) => requests.get(base.detail, { params })
//广告分类管理
export const selectContentCategoryByParentId = (params) => requests.get(base.selectContentCategoryByParentId, { params })
export const insertContentCategory = (params) => requests.get(base.insertContentCategory, { params })
export const updateContentCategory = (params) => requests.get(base.updateContentCategory, { params })
export const deleteContentCategoryById2 = (params) => requests.get(base.deleteContentCategoryById2, { params })
export const getselectTbContentAllByCategoryId = (params) => requests.get(base.getselectTbContentAllByCategoryId, { params })
export const insertTbContent = (params) => requests.get(base.insertTbContent, { params })
export const deleteContentByIds = (params) => requests.get(base.deleteContentByIds, { params })
//登录
export const login = (params) => requests.post(base.login, params )
export const permission = () => requests.get(base.permission)

